<?php echo $main_menu; ?>
<div id="edit-profile">
	<div id="addmember-modal" class="modal hide fade">
		<iframe src="<?php echo base_url().'users/addmember';?>"></iframe>
	</div>
	<div id="editmember-modal" class="modal hide fade">
		<iframe src=""></iframe>
	</div>
	<div id="editprofile-container">
				<div class="span4">
					<a href="<?php echo base_url(); ?>"><img src="<?php echo base_url().'assets/img/muziklaban.png';?>" /></a>
					<p class="font-feas step-text font-yellow"><?php echo $this->session->userdata('strName');?></p>
					<a style="display:block;" href="<?php echo base_url().'profile/view_profile/'.$profile['intID']; ?>">
						<p class="font-feas step-text font-yellow">(View Profile)</p>
					</a>
				</div>
				
				<div class="span4">					
					<fieldset>
						<div class="span2">
							<h5>
								BAND MEMBERS
							</h5>					
						</div>
						<div class="span2">
							<h5>
								INSTRUMENTS
							</h5>
						</div>		
						<?php foreach($members as $member):?>
							<div class="span6 band-members">
								<div class="span2">
									<p><?php echo $member['strFirstName'].' '.$member['strLastName'];?></p>
								</div>
								<div class="span2">
									<p><?php echo $member['strInstrument'];?></p>
								</div>
								<div class="span2">
									<button class="btn-removemember login-button btn btn-inverse" onclick="del_member(<?php echo $member['intID'];?>)">-</button>
									<button class="btn-editmember login-button btn btn-inverse" onclick="edit_member(<?php echo $member['intID'];?>)">EDIT</button>
								</div>
							</div>
						<?php endforeach;?>
						<div class="span8"><br /></div>
						<div class="span8">
							<p class="button-set">
								<button id="btn-addmember" class="login-button btn btn-inverse" type="button" data-toggle="modal" data-target="#addmember-modal">ADD MEMBER</button>
							</p>
						</div>
						<div class="span6">
							<hr />
							<fieldset>
								<h5>
									LOCATION
								</h5>
								<select name="strLocation" id="strLocation" class="required" disabled>
								<?php foreach($locations as $item):?>
									<option value="<?php echo $item['intID'];?>" <?php if($item['intID'] == $cur_location){ echo 'selected="selected"';}?> >
										<?php echo $item['strRegionName1'].' - '.$item['strRegionName2'];?>
									</option>
								<?php endforeach;?>
								</select>
								<button id="btn-editlocation" class="login-button btn btn-inverse" type="button" onclick="edit_location()">EDIT LOCATION</button>
							</fieldset>
							<div id="message-edit-location"></div>
						</div>
						<div class="clear"></div>
						
						<div class="span6">
							<hr />
							<?php if($error !=''): ?>
								<div class="alert alert-error"><?php echo $error; ?></div>
							<?php endif; ?>
							<div class="uploaders span3">
							
							<form action="<?php echo base_url() ?>users/upload_video/<?php echo $this->session->userdata('intID'); ?>" method="post" enctype="multipart/form-data">							
								<h5>UPLOAD VIDEO (.mp4 or .flv)</h5>
								<input type="file" name="Filedata" ><br>
								<input class="btn" type="submit" name="submit" value="Submit">
							</form>
							<form action="<?php echo base_url() ?>users/upload_image/<?php echo $this->session->userdata('intID'); ?>" method="post" enctype="multipart/form-data">							
								<h5>UPLOAD PHOTO (.jpg,.gif or .png)</h5>
								<input type="file" name="Filedata" ><br>
								<input class="btn" type="submit" name="submit" value="Submit">
							</form>	
								
							</div>
							<div class="span2">
								<?php if($profile['strVideoFileName']!=''): ?>							
									<video width="260" height="100" controls>									
									  <source src="<?php echo base_url().'assets/uploads/videos/'.$profile['strVideoFileName']; ?>" type="video/mp4">								  
									  Your browser does not support the video tag.
									</video>
								<?php endif; ?>							
								<?php if($profile['strPicture']!=''): ?>
									<img src="<?php echo base_url().IMAGE_UPLOAD_DIR.$profile['strPicture']; ?>">
								<?php endif; ?>
							</div>
							<div class="clear"></div>
							<hr />
							
								
							
							
							<div id="about">
									<h5>Profile</h5>
									<div id="about-text-container">
										<textarea disabled="disabled" rows="10" cols="88" name="edit-band-profile" id="edit-band-profile"><?php echo $profile['strProfile'];?></textarea>
									</div>
									<button id="btn-editabout" class="login-button btn btn-inverse" type="button" onclick="edit_about()">EDIT ABOUT</button>
									<span id="edit-about-message"></span>
							</div>
						</div>
					</fieldset>
					
				</div>
					
			<div class="clear"></div>
	</div>
</div>